# -*- coding: utf-8 -*-

# startswith()方法可以检测一个源字符串是否以另一个字符串开头
# 如果startswith()检测另一个字符串是以指定字符串开头则返回True，否则返回False
info = 'this is a string example!!'

result = info.startswith('this')
print(result)

result = info.startswith('this is a string example!!')
print(result)

print(bool(info == 'this is a string example!!'))

result = info.endswith('this is a string example!!')
print('result:', result)